<?php
require_once './libraries/utilies/function.php';
$path = "data/films.txt";
$full_path = realpath($path);
$fimls = mreadFile($full_path);
?>
<from method="POST">
    <?php
    for($i=0;$i<count($fimls);$i++){
        $a = trim($fimls[i],"t\n\r");
        $fimls=  explode(";", $a);
        if($_GET["if"]==$fimls[0]){
            ?>
   Name:<input type="text" name ="fiml-title " id ="fiml-title" value="<?php if (!isset($mang[2])) echo $mang[2]; ?>">
  rate:  <input type="text" name ="fiml-title " id ="fiml-title" value=" <?php if (!isset($mang[3])) echo $mang[3]; ?> ">
  <br>
   <img src="public/Images/films/<?php echo $mang[i];?>"
        <input type="submit" name="submit" value ="save"><br>
    <?php }}?>
</from>

<?if(isset($_POST["submit"]))?>